import type { Metadata } from 'next'; import Link from 'next/link'; import { notFound } from 'next/navigation'; import { DiffViewer } from '@/components/events/diff-viewer'; import { EventList } from '@/components/events/event-row'; import { SignificanceBadge } from '@/components/ui/badges'; import { KV, Row } from '@/components/ui/key-value'; import { Container, Note } from '@/components/ui/section'; import { api, ApiError } from '@/lib/api'; import { fmtDateTime, fmtInt, fmtPct } from '@/lib/format'; import { routes, SURFACE_LABELS } from '@/lib/site'; export const revalidate = 600; export const metadata: Metadata = { title: 'Change', robots: { index: false } }; export default async function ChangePage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; let ch; try { ch = await api.change(id); } catch (e) { if (e instanceof ApiError && e.notFound) notFound(); throw e; } return (

Change · {SURFACE_LABELS[ch.surface] ?? ch.surface}

{ch.company ? ( {ch.company.display_name} ) : ( 'Monitored page' )}{' '} · {SURFACE_LABELS[ch.surface] ?? ch.surface} changed

Detected {fmtDateTime(ch.detected_at)} · kind {ch.kind} · text delta {fmtPct(ch.text_delta_ratio, 1, true)} {ch.similarity !== null ? ` · similarity ${fmtPct(ch.similarity, 1, true)}` : ''}

); }